package edu.mis.modules.categoryOfGoods;

import java.util.List;
import edu.mis.model.CategoryOfGoods;

public class CategoryOfGoodsService {
	private CategoryOfGoods dao = CategoryOfGoods.dao;
	
	public boolean saveCategory(CategoryOfGoods category) {
		return category.save();
	}
	
	public List<CategoryOfGoods> findAllCategoryOfGoods() {
		return dao.findAll(); 
	}
	
	public CategoryOfGoods findCategoryById(int id) {
		return dao.findById(id);
	}
	
	public boolean updateCategory(CategoryOfGoods category) {
		return category.update();
	}
	
	public boolean deleteCategoryById(int id) {
		return dao.deleteById(id);
	}
}
